package com.example.service;

import com.example.mapper.AddressMapper;
import com.example.pojo.Address;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class AddressService {

    @Autowired
    private AddressMapper addressMapper;

//    添加收获地址
    public void add(Address address) {
        addressMapper.insert(address);
    }


//    删除地址
    public void delete(String id) {
        addressMapper.delete(id);
    }

//    修改收获地址
    public void updateAddress(Address address) {
        addressMapper.updateAddress(address);
    }

//    获取收获地址
    public Address selectAddress(Integer empId) {
       Address address = addressMapper.selectAddress(empId);
        return address;
    }
}
